const express = require('express');
const router = express.Router();
const mongoose = require('mongoose');
const UserInfo = mongoose.model('UserInfo');
const userHandler = require('../handlers/userHandler');

module.exports = function(app) {
    app.use('/', router);
};

router.get('/register', function(req, res, next) {
    console.log('this is from register!!');
    res.send('this is user register');
});

router.post('/register', userHandler.userEixst, userHandler.userRegister);